<template>
  <div>
    <request-detail v-if="detailInfo&&offerInfo" :request-detail-info="detailInfo"
                    :offerInfo="offerInfo"></request-detail>
    <!--    <request-form-->
    <!--      :requestid="requestid"-->
    <!--      :user-role="userRole"-->
    <!--      :title="title"-->
    <!--      :subTitle="title"-->
    <!--      :offer-id="offerId"-->
    <!--      :get-platform="getPlatform"-->
    <!--      :creativeRequestData="dataList"-->
    <!--      ref="addForm"-->
    <!--    ></request-form>-->
    <request-check-detail
      :product="true"
      :requestid="requestid"
      :platform="platform"
      :offer-id="offerId"
      :title="title"
      :subTitle="title"
      :userRole="userRole"
      :creativeRequestData="dataList"
      :offerInfo="offerInfo"
      ref="upload"
    ></request-check-detail>
  </div>
</template>

<script>
import requestForm from "./request-form";
import requestCheckDetail from "./request-check-detail";
import requestDetail from "@/views/offer/components/creativeRequest-components/requestDetail";

export default {
  name: "request-check",
  components: {
    requestForm,
    requestCheckDetail,
    requestDetail,
  },
  props: {
    tips: String,
    requestid: String,
    offerId: String,
    title: String,
    userRole: Object,
    close: Function,
    dataList: Object,
    offerInfo: Object,
    detailInfo: Object,
  },
  data() {
    return {
      check: "check",
      platform: "", //媒体
    };
  },
  methods: {
    /**
     * 提交
     */
    submit() {
      let flag = this.$refs.addForm.validateForm();
      let flagUplod = this.$refs.upload.validateForm();
      if (flag && flagUplod) {
        console.log(this.$refs.form.form);
        console.log(this.$refs.upload.form);
      }
    },
    /**
     * 关闭
     */
    handlerClose() {
      this.close();
    },
    /**
     * 获取form表单选中的媒体
     */
    getPlatform(val) {
      this.platform = val;
    },
  },
};
</script>

<style scoped lang="scss">
/deep/ div.el-tabs__item.is-active {
  background-color: dodgerblue;
  color: white;
  border: 1px solid dodgerblue;
  border-radius: 10px;
}

/deep/ div.el-tabs__item {
  border: 1px solid dodgerblue;
  border-radius: 10px;
  margin-right: 5px;
  text-align: center;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

.btn-group {
  display: flex;
  justify-content: center;
  padding: 2em 0;
}

.detailList-body {
  width: 100%;
  background-color: whitesmoke;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  margin-top: 3em;
  padding-top: 1em;
}
</style>
